#pragma once

#include "CButtonControl.h"
#include "CGroupBase.h"

NAMESPACE_CORE_BEGIN

class UI_API CRadio : public CButtonControl, public CGroupBase
{
public:
	CRadio();
	CRadio(int_32 iX, int_32 iY, int_32 iWidth, int_32 iHeight);
	~CRadio();

	const COID & GetOID() const;
public:
	IGroup * GetGroup();
	IControl * GetGroupControl();

	void MouseClick(CMouseArgument & args);
	void OnPaintBack(IPaint * pPaint, const CRectInt32 & rcClip) const;

public:
	void SetChecked(bool bChecked);
	bool IsChecked() const;
	void CheckedChanged();

protected:
	void DrawButtonIcon(IPaint * pPaint, int_32 iX, int_32 iY) const;
	void DrawButtonText(IPaint * pPaint, int_32 iX, int_32 iY) const;

	void DrawIconV8(IPaint * pPaint, int_32 iX, int_32 iY) const;
};

NAMESPACE_CORE_END
